package com.aidex.common.core.domain.entity;

import com.aidex.common.annotation.Excel;
import com.aidex.common.core.domain.BaseEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

@Data
@EqualsAndHashCode(callSuper = true)
@Api(tags = "岗位")
public class SysPost extends BaseEntity {

    @ApiModelProperty("岗位编码")
    @Excel(name = "岗位编码")
    @NotBlank(message = "岗位编码不能为空")
    @Size(max = 64, message = "岗位编码长度不能超过64个字符")
    private String postCode;

    @ApiModelProperty("岗位名称")
    @Excel(name = "岗位名称")
    @NotBlank(message = "岗位名称不能为空")
    @Size(max = 50, message = "岗位名称长度不能超过50个字符")
    private String postName;

    @ApiModelProperty("排序")
    @Excel(name = "排序")
    @Min(value = 0, message = "最小值必须大于等于0")
    private int sort;

    @ApiModelProperty("状态")
    @Excel(name = "状态" , readConverterExp = "0=正常,1=删除，2=停用")
    private String status;
}
